package com.njwb.day13.jingtai;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MyInvocationHandler  implements InvocationHandler {
    private Object a;
    public MyInvocationHandler (Object a){
        this.a=a;
    }



    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("动态代理开始...");
        Object r=method.invoke(a,args);
        System.out.println("动态代理结束...");
        return r;
    }
}
